using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Daniel.Core.Models.Mapping
{
    public class RelatedProductMap : EntityTypeConfiguration<RelatedProduct>
    {
        public RelatedProductMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            // Table & Column Mappings
            this.ToTable("RelatedProduct");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.ProductId1).HasColumnName("ProductId1");
            this.Property(t => t.ProductId2).HasColumnName("ProductId2");
            this.Property(t => t.DisplayOrder).HasColumnName("DisplayOrder");
        }
    }
}
